<%@ page contentType="text/html;charset=utf-8" language="java"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:html> 
	<head>
		<META http-equiv=Content-Type content="text/html; charset=utf-8">
		<LINK href="./styles/sciencee.css"  type=text/css rel=stylesheet>
		<style type="text/css"></style>
		<title>CGProject</title>
		<html:base/>
	</head>
	<body topmargin="1" leftmargin="1" rightmargin="1" bottommargin="1">
		<table border="0" width="100%" cellspacing="0" id="table1" style="border: 1px solid #C0C0C0" height="50" cellpadding="0">
		<!-- MSTableType="nolayout" -->
		<tr>
			<td height="66"  colspan="10" background="../image/repeat.gif" align="left"><span lang="en-us">&nbsp;<b><font size="6"> 
			<img border="0" src="../image/head.gif" width="586" height="82"></font></b></span></td>
		</tr>
		<tr>
			<td >
				<b><span style="font-size: 9pt"><bean:message key="currentrole"/>&nbsp;</span></b>
				<img src="../image/atb_members.gif" width="16" height="16">
				<b><font color="#345487"><span style="font-size: 9pt"><logic:present name="RoleName" scope="request"><bean:write name="RoleName" scope="request"/></logic:present></span></font></b>
				<a href="../logout.do" onclick="return confirm('')">[<bean:message key="logout"/>]</a>
				<a href="../help/frame.html">[<bean:message key="help"/>]</a>
			</td>
			<td style="text-align: right">
				<html:form action="/login" onsubmit="return  submitUserLogin()">
				<bean:message key="reguser"/>：
				<html:text property="regname" size="12" style="border:1px solid #C0C0C0; font-family: Tahoma; font-size: 11px"/><html:errors/>
				<bean:message key="password"/>：
				<html:password property="password" size="12" style="border:1px solid #C0C0C0; font-family: Tahoma; font-size: 11px"/>
				<html:submit property="submit" style="font-family: Tahoma; font-size: 11px"><bean:message key="login"/></html:submit>
				</html:form>
				
				<html:form action="/changer" onsubmit="return submitChangeRole();">
				<bean:message key="selectrole"/>：
				<html:select property="roleselect" style="border:1px solid #C0C0C0; font-family: Tahoma; font-size: 11px">
					<html:options  collection="Roles"
								   property="roleId"
								   labelProperty="roleName"/>
				</html:select>
				<html:submit property="submit" style="font-family: Tahoma; font-size: 11px"><bean:message key="change"/></html:submit>

				</html:form>
			
			</td>
		</tr>		
		<tr>
			<td height="25" style="border-top: 1px solid #C0C0C0 font-size: 9pt" colspan=10>
				<table cellspacing="0" height="100%" >
					<tr>
						<logic:iterate id="element" name="Guides">
							<td  width="80" height="25" style="border-right:1px solid #C0C0C0" align="center">
								&nbsp;&nbsp;<html:link page="/listClass.do" paramId="CurrentGuideID" paramName="element" paramProperty="guideId"><bean:write name="element" property="guideName"/></html:link>&nbsp;&nbsp;
							</td>
						</logic:iterate>
										
					</tr>
				</table>
			</td>
		</tr>
	
</html:html>
	<script language="javaScript">

	function isEmpty(theField)
	{
		if(theField.value=="")
			return true;
		else
		return false;
	}
	function submitUserLogin()
	{
		var emptyField=0;
	 	if(isEmpty(window.document.loginForm.regname)==true)
 		{
     		alert("Please input reguser！");
     		window.document.loginForm.regname.focus();
     		return false;
 		}
		if(isEmpty(window.document.loginForm.password)==true)
 		{
     		alert("Please input password！");
     		window.document.loginForm.password.focus();
     		return false;
		}
     	window.document.loginForm.submit();
	 }
	 function submitChangeRole()
	 {
		if(window.document.loginForm.RoleNo.value=="0")
		{
			alert("Please select role！");
			window.document.loginForm.RoleNo.focus();
			return false;
		}
	 	window.document.loginForm.submit();
	 }
	</script>
	<SCRIPT language="javascript" src="./js/ciphering.js"></SCRIPT>
	<table width="100%" border="0" cellspacing="0"  cellpadding="0" >
					<tr>
						<td>
						<logic:notEmpty name="NoProject">
							<h1><bean:message key="younotinproject"/>您未参与任何项目!</h1>
						 </logic:notEmpty>
					
						</td>
					</tr>
	</table>
					